home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue45 / Webdebug / HowToDebug.txt next >
Encoding:
Text File  |  2000-11-02  |  3.0 KB  |  51 lines

  1. Debugging ISAPI Application Using Delphi 4
  2.  
  3. First make sure that you installed the NT Option pack and that you have selected the optional SDK options. This insures that you get the document IIS_as_process.txt and the following reg files.
  4. IISProcess.reg 
  5. IISService.reg 
  6. Having these registry files saves a ton of time. These reg files assume that IIS is installed in "c:\winnt\system32\inetsrv\inetinfo.exe". If that is not the case, modify the .reg files appropriately before using them.
  7.  
  8.    1.Open the Services dialog box in the Control Panel.
  9.  
  10.    2.Select the IIS Admin service and click the Startup button.
  11.  
  12.    3.Select the Allow Service to Interact with Desktop check box and click OK.
  13.  
  14. 4.Repeat steps 2 and 3 for all processes that run under the IIS Admin     process, for example World Wide Web Publishing Service, and FTP Publishing Service.
  15.  
  16.    5.Use the Registry Editor (REGEDIT) to add a subkey named Inetinfo.Exe to
  17.      the
  18.      HKEY_LOCAL_MACHINE/Software/Microsoft/WindowsNT/CurrentVersion/Image
  19.      File Execution Options key.
  20.  
  21.    6.Add the following entry to this new key:
  22.      Debugger = Fullpath/delphi32.exe where FullPath is the full path
  23.      to the delphi32.exe. 
  24.  
  25.  
  26.    7.Use the User Manager for Domains administration tool (USRMGR) to add the
  27.      Log on as Service, Act as part of the operating system and Generate
  28.      security audits rights on the local computer to the NT account you will use
  29.      when debugging the ISAPI extension.
  30.  
  31.    8.Use the Distributed COM Configuration utility (DCOMCNFG) to change the
  32.      identity of the IIS Admin Service to the user account you will use for
  33.      debugging.
  34.  
  35. 9.The .reg files mentioned above do this for you so don't do 9 and 10 manually if you have the Reg Files mentioned above.
  36. Use the Registry Editor (REGEDIT) to remove the LocalService keyword from
  37.      all IISADMIN-related subkeys under HKEY_CLASSES_ROOT/AppID. This
  38.      keyword may be found in the following subkeys: 
  39.      {61738644-F196-11D0-9953-00C04FD919C1} // IIS WAMREG admin Service
  40.      {9F0BD3A0-EC01-11D0-A6A0-00A0C922E752} // IIS Admin Crypto
  41.      Extension
  42.      {A9E69610-B80D-11D0-B9B9-00A0C922E750} // IISADMIN Service
  43.   The LocalService keyword may be found in additional subkeys of AppID.
  44.     
  45. 10.Add LocalServer32 subkeys to all IISADMIN related subkeys under the CLSID     node of the registry. This will include subkeys corresponding to all of the    subkeys you removed in the previous step. Set the default value of these new  keys to <path>\inetinfo.exe -e w3svc. (<path> is normally "c:\winnt\system32\inetsrv".)
  46.  
  47. 11.Stop the WWW and FTP services from the Services dialog box in the Control   Panel.
  48.  
  49.   12. Start Delphi 4 and select Run Parameters. Enter "-e w3svc" into the Parameters Edit box and enter the complete path including file name on the system to inetinfo.exe (for example "c:\winnt\system32\inetsrv\inetinfo.exe"). 
  50.  
  51. You must reverse this process to restore the previous settings and allow IIS to be run as a service.
  52.